import { ElMessageBox } from 'element-plus';

export const confirmModel = (title, callback) => {
  ElMessageBox.confirm(title, {
    confirmButtonText: 'OK',
    cancelButtonText: 'Cancel',
    type: 'error',
  })
    .then(() => {
      return new Promise((resolve, reject) => {
        callback(resolve, reject);
      });
    })
    .catch(() => {});
};
